<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html>
	<head>
		<title>Input</title>
		<link rel="stylesheet" href="demos.css">
		<link rel="stylesheet" href="/Dongbu/lib/jquery-ui-1.8.18/css/ui-lightness/jquery-ui-1.8.18.custom.css">
		<script src="/Dongbu/lib/jquery-ui-1.8.18/js/jquery-1.7.1.min.js"></script>
		<script src="/Dongbu/lib/jquery-ui-1.8.18/js/jquery-ui-1.8.18.custom.min.js"></script>
		<script src="/Dongbu/lib/jquery-ui-1.8.18/js/i18n/jquery.ui.datepicker-ko.js"></script>
		<script>
			$(function() {
				$( "#dialog" ).dialog();

				$('#datepicker').datepicker( {
				 	changeMonth: true,
					changeYear: false,
					showButtonPanel: false,
					dateFormat: 'mm',
					onClose: function(dateText, inst) { 
						var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();            
						var year = $("#ui-datepicker-div .ui-datepicker-year").html();
						$(this).datepicker('setDate', new Date(year, month, 1));
					}
				});
				
				$("#addmember").button().click(function(){
					var lastindex = $("input[name='childname[]']").length;
					$("#memberlist").append("<input type=\"text\" id=\"childname" + lastindex++ + "\" name=\"childname[]\" />");
				});
				
				$("#inputtime").button().click(function(){
					var totalcount = $("input[name='childname[]']").length;
				});
			});
		</script>
		<style>
			.ui-datepicker-calendar {display: none;}
		</style>
	</head>
	<body>
		<div id="dialog" title="Basic dialog">
			<p>입력양식 예제입니다.</p>
		</div>
		<table class="layout-grid" cellspacing="0" cellpadding="0">
		<tr>
			<td class="left-nav">
				<dl class="demos-nav">
					<dt>해야할 리스트</dt>
						<dd><a href="#">인원설정</a></dd>
						<dd><a href="#">인원 이름 입력</a></dd>
						<dd><a href="#">인원별 시간입력</a></dd>
				</dl>
			</td>
			<td class="normal">
				<input type="text" id="datepicker"/>
				<br/>
				
				<button id="addmember">인원추가</button>
				<div id="memberlist" class="normal">
				</div>
				<br/>
				
				<button id="inputtime">인원별 시간입력</button>
				<div id="timelist" class="normal">
				</div>
			</td>
		</tr>
		</table>
	</body>
</html>